%MY_DIFFERENCEOFGAUSSAINS Summary of this function goes here
% This function calculates two different gaussians for a given image, with
% the given standard deviations sigma0 and sigma1. Then it takes the
% difference between the two gaussians.
function [ dog ] = my_differenceOfGaussians( img, sigma0, sigma1 )

h = size(img,1);
w = size(img,2);
w = 5;

%create first gaussian kernel
middle = w/2.0; 
[X, Y] = meshgrid(1:w);
%gaussKernel1 = ( 1/(2*pi*sigma0^2))*exp(-((X-middle).^2+(Y-middle).^2)/(2*sigma0^2) );
gaussKernel1 = fspecial('gaussian', w, sigma0)*255;

%create second gaussian kernel
%gaussKernel2 = ( 1/(2*pi*sigma1^2))*exp(-((X-middle).^2+(Y-middle).^2)/(2*sigma1^2) );
gaussKernel2 = fspecial('gaussian', w, sigma1)*255;

gaussian1 = conv2(img, gaussKernel1);
gaussian2 = conv2(img, gaussKernel2);

dog = (gaussian1 - gaussian2);
    
end

